I need the truth. I have a Nikon D3100 and I want to buy a Flash?

Is it ok to buy an off brand flash for my camera or do I need to get a Nikon brand such as the SB 400? And if so Why.Please?

The Nikon SB electronic flash is really the best because it is designed to use the proprietary features in both your D3100 and the flash. These are patented features that a third party flash can't have on-board

The SB-400 is a nice flash if you want to take some party snapshots, but other than that it is of very limited use, i've found. It doesn't offer any manual modes, which are essential for firing it wirelessly off camera.
I think you'd be better off with a somewhat bigger flash, a SB-600 or 700. These will give you much more room to grow. I don't use my SB-400 anymore at all.
There are also third party manufacturers that make decent flashes. Yongnuo, Nissin and Metz spring to mind. I've become a fan of Yongnuo, as they offer excellent value for money - including optical slave modes on some of them that enable you to trigger them wirelessly with your popup flash.
Pay close attention that you get one that also supports TTL on the camera though - there are Yongnuo flashes such as the YN 560 which have optical slave modes but no TTL on the camera. You could either get one that has both TTL and optical slave mode (the YN 465 or 468, i'm not sure which one right now so check again), or one that only has TTL and no optical slave mode and just get a pair of radio triggers for a $30 or so if you want to use it wirelessly - that works even better than optical slave triggering.
For the price of one "naked" Nikon flash you can get up to two Yongnuo flashes including light stands and possibly softboxes.

The SB400 is good. If you can afford the SB700, it can be worth the extra money. It has more power and adjustability. As you get into using bounce flash you are likely to find those features useful. Of course besides the higher cost the extra weight can be a disadvantage.
- I have a Nikon 5100 and I want to take videos with it, What sort of SD Memory Card would I need to buy?
- What do I need to buy if I want a backdrop stand and a backdrop? What kind to buy?
- I want to buy a professional camera and I have to choose from Cannon and Nikon?
- I want a need D90 nikon camera And i want a address shop?
- I want to buy a Nikon D90. Do I buy from Best Buy or Crutchfield?