How to line up armature and mesh after deleting the armature modifier?
To fix this follow the below steps:


Select your mesh
Hit ctrl+A and choose apply Scale
Do same step 2 and apply location and rotation
Select your armature
Switch to Pose mode
Hit Space Bar and choose "Apply Pose as Rest Pose"
Select Mesh then select armature and hit ctrl+P
Parent with automatic weighting


It will be working fine as shown below: