Do you mean how to get/set materials on a static mesh / skeletal mesh?
Or do you mean how to reference a material you made in Editor in code?
Because for referencing materials you definitely do want to use blueprints!
Reason:
When you package your game, asset paths change, and if you hard coded your asset path in C++ it may not make the transition to packaged game!
Using the editor / blueprints to reference materials into code is the ideal way to do things, because you can then also easily change the materials at any time using the editor!
The packaging system handles the proper linking of all your assets that are referenced using BP defaults 
Sometimes I only open the editor just to set these various asset references for use in code, and then close it again immediately and go back to coding, so that is one workflow to get used to avoid headaches later when you are packaging your game.
Just to be clear, I mean asset references like this:
.h
**//BP Classes**
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category="My BPs")
UClass* SelectionMeshBP;
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category="My BPs")
UClass* VictoryWallBP;
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category="My BPs")
UClass* VictoryDestructionBP;
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category="My BPs")
UClass* EditorXBP;
**//Particle System**
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category=ExplosionPS)
UParticleSystem * TorusMeshRadialExplosionPS;
**//Materials**
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category=Materials)
UMaterialInterface* MyMaterial;
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category=Materials)
UMaterialInterface* MyMaterial2;
It’s not less efficient to do this involving the editor, making a BP of the above class which has all these references to other project assets.
It is the most time efficient and project efficient thing you can do 
**Global Data Storage Wiki**
There is a C++ class that UE4 provides if you want to store all your game assets in one place, to use anywhere in your code base:
https://wiki.unrealengine.com/Global_Data_Access,_Data_Storage_Class_Accessible_From_Any_CPP_or_BP_Class_During_Runtime!
Rama