You want to wait about 10-14 days in primary then take a hydrometer reading to see where your at. At that point the fermentation will have produced enough alcohol to help sanitize it to prevent from airborne contamination as long as you are sanitary with taking your sample. IE sanitize whatever equipment you are going to be using and insure it was clean before sanitizing. The Wort will also have a layer of CO2 on top of it to help protect it from the oxygen.
When you take your Hydrometer Sample check it again in a few days. If it hasn't changed any then you can rack to secondary(if desired) or just leave it in the primary till your ready to bottle or keg. If the second reading is lower than the first than check again in a few more days.
As for Secondary there is a lot of controversy over necessity of it or not. Most will Forgo using a secondary unless Adding a fruit addition or other adjunct for flavoring. Others will just do it all in the primary and also wind up making good beer. It really comes down to personal preference.
I only Rack to secondary if
1. I need the fermenter for the next batch.
2. I am adding fruit
3. If I want to age a Beer Long Term
other than that I just let it ride in primary then rack to keg when its ready.
As long as you work sanitarily around the open fermenter you will be fine.