If you have already tried forgetting the device and doing a full reset of the AirPods that's a good first step.
That would leave either a problem with the Bluetooth connection itself or the hardware of either device (The AirPods or the device you are connecting them to.) To see what could be causing this you should experiment with other Bluetooth devices to see if you can replicate the connection issues exactly.
For example, try using a speaker with your iPhone. Put the speaker and the iPhone in the same place that they would usually be in. Then try connecting the AirPods to another Bluetooth device, for example to a Laptop. And then finally try another place altogether to eliminate wireless interference.
By following these steps you should be able to determine if the issue is wireless interference and if not which device is having a hardware issue. If you find a hardware issue to be at fault, contact Apple to look into options for repair and replacement. If you find wireless interference to be the issue try to eliminate the problem by determining what could be responsible (WiFi routers, microwave ovens, etc..
You can find more info on how to troubleshoot your Bluetooth connection here