What you will need to do is equip a sniper rifle. When fighting an Atlas mech, stay in cover and only fire sniper shots at the glass in front. After a few shots, the glass will break. Once the glass is broken, kill the pilot with your sniper rifle. Once he is dead, run over to the mech and press A to climb in.
Any questions just ask in the comments.