An effective field theory approach to cosmological structure formation