Do you have to be certified to dive?
I would like to know if there is a law that says you have to be certified to dive?
Also is there any punishment for diving without being certified or for diving outside of your certification limits?
As far as I am aware, there is not any LAW that says you have to be certified to dive.
The way it usually works is that you have to show a certification card to be able to fill a dive tank or go diving with a dive shop (reputable ones anyway).
That being said, there is nothing to stop you from getting a tank from your certified buddy and going diving with him (aside from your safety of course!).
I certainly wouldn't recommend this but I know it is done.
Diving is a relatively safe sport if you have proper training and follow that training. It can quickly become a dangerous activity if you do not have the proper training and do not realize how to dive safely.
Many people also take a scuba diving resort course and then do an open water dive. They are NOT certified but they do go through some basic training to understand diving and then do a shallow dive (you can read my page on scuba diving resort courses
for more information.)
As far as your second question, there are no Dive Police or such if that is what your are asking. So there is no "punishment" per se.
The "punishment", for lack of a better word, for diving without being certified or diving outside of your limits is the very real risk of having a scuba diving accident.
So, even though it is possible to dive without being certified or to dive outside of your limits, it is something I would strongly caution against.
You are taking your life in your hands when you dive so you should be properly trained and certified before you attempt to dive (you can read more about scuba diving certification here
That's my 2 cents anyway. Hope this helps. If you have any more questions, feel free to ask.