You mean the wheel is moving from side to side?
This probably just means that your brakes aren't centred, so one brake pad is hitting the rim before the other. Wheels will flex a bit when that happens, its nothing abnormal.
Check first that your wheel is seated in the dropouts correctly. So loosen of the quick release, give it a shake and pull it right up into the dropouts. Then tighten again.
If they're dual pivot brakes, then just grab the whole brake assembly and move it by hand until they're centred. Check that they centre properly after braking as well.
If they're single pivot brakes then you need to loosen the brake nut, centre them, then tighten it up again.