The following actions will reward you with experience:
-Building a new Module
-Upgrading a Module to a new rank
-Attaching a higher level weapon / shield / armor to your Modules
-Collected blueprints
-All Research except Mk upgrade research
The following will not result in an base experience gain:
-Banking resources
-Destroying VEGA / Enemy Fleets
-Destroying a player's base
-Building a new ship
-Refitting a ship with different components
Also, when you downgrade during a refit or scrap something in the game you will not gain experience again until you rebuild up to the experience in which you just downgraded or scrapped. As a note, because there is a limited amount of blueprints, modules and research this does mean there is a "level cap" on bases that will only increase as new content is added. I hope this helps explain things better!
You can also check out this forum post for further information on XP:
https://www.kixeye.com/forum/discussion/446858