I think sentence 1 is the correct (can we), rather than sentence 2 (we can) but I am struggling to explain why this is.
Only by working together can we make every one’s life better
Only by working together we can make every one’s life better
This is a form of "negative inversion". The word "only" implies a negation: "Only by working together (and not any other way) ..."
This is a difficult and poorly understood aspect of English grammar. Some examples:
Never have I eaten sushi.
(compare "I have never eaten sushi")
Only on Monday do I wash my hair.
(Compare "I only wash my hair on Monday")
Your sentence could be rephrased without inversion:
We can only make everyone’s life better by working together
Only when the negative phrase starts the sentence is an inversion needed.
Wikipedia has further examples of negative inversion.